<template>
    <div>
        <table>
            <tr>
                <td>名称</td>
                <td>积分</td>
                <td>操作</td>
            </tr>
            <tr v-for="(i,j) in item" :key="j">
                <td>{{i.username}}</td>
                <td>{{i.level}}</td>
                <td>
                    <button>+</button>
                    <button>-</button>
                </td>
            </tr>
        </table>
    </div>
</template>

<script>
import axios from 'axios'
export default {
    name:'shouxue',
    data() {
        return {
            item:[]
        }
    },
    methods: {
        huo(){
            axios({
                url:'http://127.0.0.1:8000/zhouce/deng',
                method:'get'
            }).then(res=>{
                this.item = res.data
            })
        }
    },
    created() {
        this.huo()
    }
}
</script>

<style scoped>

</style>
